#!/bin/bash
sudo apt update
sudo apt-get install -y --no-install-recommends g++ make automake autoconf bzip2 \
unzip wget sox libtool git subversion python2.7 python3 zlib1g-dev gfortran ca-certificates patch

echo "Build kaldi tools, default using mkl"
./extras/install_mkl.sh
make -j $(nproc)

cd ../src
echo "Build kaldi..."
./configure --shared
make -j $(nproc) depend
make -j $(nproc)